caboCity.implement({
	initEmpire: function(){
		this.population = 0; //Number of citizens living in the city
		
		//Inmigrations vars
		this.desirability = 1;
		
		this.paymentEmpire = 30;
		this.payment = this.paymentEmpire;
		
		this.employed = 0;
		this.unemployed = 0;
	}
	
	//Can people come to the city?
	//When there are free space in houses.
	//desirability of the city for the inmigrants.
	//Var for desirability [0 1] (default: 1): payment comparison (city-empire); % de unemployed
	,checkInmigration: function(){
		if(!this.totalFreeSpace) return; //No free space
		
		var numberInmigrants = this.totalFreeSpace/this.desirability; //The number of inmigrants will come this month.
		var incrTime = d.emp.mes/numberInmigrants;
		for(var i=0; i<numberInmigrants; ++i){
			this.inmigrantIsComming.delay(incrTime*i, this);
		}
	}
	
	//Decide which house can go.
	//First it will try to go to a house zone.
	, inmigrantIsComming: function(){
		if(!this.totalFreeSpace) return;
		
		if(this.freeHouseZones.length != 0) {
			var nexth = this.freeHouseZones.shift();
			this.inmigrantTo(nexth);
		}
	}
	
	//Inmigrant has been decided which house should go.
	//It will go to.
	, inmigrantTo: function(dest){
		if(!this.isHouse(coor)) {
			msg("Error: No es una casa.");
			return;
		}
		//Create body inmigrant
	}
	//When population will be increased
	,morePeople: function(){
	
	}
	//When population will be decreased
	,lessPeople: function(){
	
	}
});
